#{extends 'head.html' /} 
#{set title:'蓝莲花 | 图书详细' /} 

<link rel="stylesheet" href="/public/stylesheets/alert.css" type="text/css"></link>
<script type="text/javascript" src="/public/javascripts/adu.alert.js"></script>
<script type="text/javascript" src="/public/indexFile/js/share.js"></script>
${(service.AdsService.get("bookads",1)).raw() }
<!-- content 开始-->
    <div class="cont">
    	<!-- 左 -->
    	<div class="boge1">
        	<!--一-->
            <div class="cn_a_1">
            	<div class="ca_1a"><img src="/public/indexFile/images/images_17.gif"/></div>
                <div class="ca_1b">
                	#{list bookTypes , as:"bookType"}
                	<div class="ca_1b_1">
                    	<div class="ca_bm1">
                        	<div class="cbm_a">${bookType.botName}</div>
                        	<div class="cbm_b"><a href="/books.html${bookType.fid == null ?  "" : "?id="+bookType.fid}">后退&lt;&lt;</a></div>
                        </div>
                        <div class="ca_bm2">
                        	<ul>
                        		#{list bookType.sTypes , as:"st"}
                            		<li><a href="/books.html?id=${st.id }">${st.botName}</a></li>
                                #{/list}
                            </ul>
                        </div>
                    </div>
                   #{/list} 
                </div>
            </div>
            
            <!--二-->
            <div class="bge_a">
            	<div class="bge_a1">
                	<div class="bea_y">浏览历史</div>
                </div>
                <div class="bge_a2">
                	<ul>
                    	<li><a href="#" class="hge">1&nbsp;&nbsp;中国科技技术</a></li>
                    </ul>
                </div>
                <div class="bge_a3"></div>
            </div>
            
             <!--三-->
            <div class="bge_a">
            	<div class="bge_a1">
                	<div class="bea_y">猜你喜欢</div>
                </div>
                <div class="bge_a2">
                	<ul>
                        <li><a href="#" class="hge">1&nbsp;&nbsp;中国科技技术</a></li>
                    </ul>
                </div>
                <div class="bge_a3"></div>
            </div>
        </div>
        <!-- 右 -->
        <div class="boge2">
        	<!-- 一 -->
            <div class="cn_a_r1">
                <div class="cr1_n"><select><option>书籍名字</option></select></div>
                <div class="cr1_x"><input type="text"/></div>
                <div class="cr1_v"><a href="#"><img src="/public/indexFile/images/images_19.gif"/></a></div>
                <div class="cr1_m">
                    <ul>
                        <li class="mvn">热门搜索：</li>
                        <li><a href="#">微微书香</a></li>
                    </ul>
                </div>
            </div>
            
            <!-- 二 -->
            <div class="el_c2_a">
            	<!--<div class="lt_b1 elca_1">
                	<ul>
                    	<li class="mw">您的位置：</li>
                        <li class="mw1"><a href="#">首页</a></li>
                        <li><a href="#">列表</a></li>
                        <li>列表</li>
                    </ul>
                </div>-->
                <div class="el_c2_a1">
                	<ul>
                    	<li class="ae1">您当前位置：</li>
                        <li class="ae2"><a href="/">首页</a></li>
                        <li><a href="/books.html">图书</a></li>
                        <li>${boo.booName }</li>
                    </ul>
                </div>
                <div class="elca_2">
                	<div class="ea_2a">
                    	<div class="ea_2a1">${boo.booName }</div>
                        <div class="ea_2a2">
                        	<table class="ea_by">
                            	<tr>
                                	<td class="ea_td1" rowspan="9">
                                		<img width="185px" src="${boo.bimage }"/></td>
                                    <td class="ea_td2">作者：${boo?.auts}</td>
                                    <td class="ea_td3">${service.BookService.getAuthor(boo.id)?.autrName}</td>
                                </tr>
                                <tr>
                                    <td class="ea_td2">出版社：${boo?.pressId}</td>
                                    <td class="ea_td3">字&nbsp;&nbsp;&nbsp;&nbsp;数：${boo.booWonu == null ? 0 : boo.booWonu }</td>
                                </tr>
                                <tr>
                                    <td class="ea_td2">出版时间：2012-02-02</td>
                                    <td class="ea_td3">页&nbsp;&nbsp;&nbsp;&nbsp;数：${boo.booPages == null ? 0 : boo.booPages }</td>
                                </tr>
                                <tr>
                                    <td class="ea_td2">版&nbsp;&nbsp;&nbsp;&nbsp;次：${boo.booEdit == null ? 0 : boo.booEdit }</td>
                                    <td class="ea_td3">开&nbsp;&nbsp;&nbsp;&nbsp;数：${boo.booMo == null ? 0 : boo.booMo }开</td>
                                </tr>
                                <tr>
                                    <td class="ea_td2">印&nbsp;&nbsp;&nbsp;&nbsp;次：${boo.booSeal == null ? 0 : boo.booSeal }</td>
                                    <td class="ea_td3">纸&nbsp;&nbsp;&nbsp;&nbsp;张：平装</td>
                                </tr>
                                <tr>
                                    <td class="ea_td2">
                                    	<span style="float: left;">等级评分：</span>
                                    	<div title="${util.Util.rundStr(""+service.BookService.pinXingJi(boo.id)/60*5,1) }分" style="cursor: pointer;overflow: hidden;line-height: 12px;background: url('/public/indexFile/images/list_10.gif') no-repeat;float: left;height: 12px;margin-top: 2px;width: 60px;">
	                                		<div style="background: url('/public/indexFile/images/list_09.gif');height: 12px;width: ${service.BookService.pinXingJi(boo.id) }px;line-height:12px;">
	                                		</div>
	                                	</div>
                            		</td>
                                    <td class="ea_td3">状&nbsp;&nbsp;&nbsp;&nbsp;态：在馆</td>
                                </tr>
                                <tr>
                                    <td class="ea_td2">ISBN：${boo.booIsbn }</td>
                                    <td class="ea_td3"></td>
                                </tr>
                                <tr>
                                    <td class="ea_td2" colspan="2">所属分类：${service.BookService.finBookType(boo.bookTypeIds)?.botName}</td>
                                </tr>
                                <tr>
                                    <td class="ea_td2" colspan="2">借阅会员等级：V${boo?.bookgrade}</td>
                                </tr>
                            </table>
                        </div>
                        <div class="ea_2a3">
                        	<div class="ea3_1">
                        		<a id="${boo.id }" rel="putBoo"><img src="/public/indexFile/images/book_08.gif"/></a></div>
                            <div class="ea3_2"><a href="#"><img src="/public/indexFile/images/book_09.gif"/></a></div>
                            <div><a class="shareto_button" style="margin-left:40px;" href="http://shareto.com.cn/share.html"><img src="http://s.shareto.com.cn/btn/lg-share-cn.gif" width="125" height="21" alt="分享道" style="border:0"/></a></div>
                        </div>
                    </div>
                    <div class="ea_2b">
                    	${boo?.booCatalog?.raw() }
                    </div>
                    <div class="ea_2c">
                    	<div class="ea_2c1">用户书评</div>
                        <div class="ea_2c2">
                        	<div class="ec2_1">
                            	<div class="e_c2a">与描述相符</div>
                                <div class="e_c2b">
                                	<div class="ecb_1">${util.Util.rundStr(""+service.BookService.pinXingJi(boo.id)/60*5,1) }</div>
                                    <div class="ecb_2">
                                    	<div class="ecb_2_1"></div>
                                        <div class="ecb_2_2"><samp>${boo.booPin }</samp>次打分</div>
                                    </div>
                                </div>
                            </div>
                            <div class="ec2_2">
                            	<div class="ec2_2a">
                                	<!-- 改变 margin-left: 的值可移动-->
                                    <div class="e_ca1" style="margin-left: ${(service.BookService.pinXingJi(boo.id)/60)*376 }px">${util.Util.rundStr(""+service.BookService.pinXingJi(boo.id)/60*5,1) }</div>
                                </div>
                                <div class="ec2_2b">
                                	<ul>
                                    	<li>非常不满</li>
                                        <li>不满意</li>
                                        <li>一般</li>
                                        <li>满意</li>
                                        <li>非常满意</li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="ea_2c3"><!-- <select><option>有评价内容</option></select> --></div>
                        <div class="ea_2c4">
                        	<ul>
                            	#{list service.CommentService.getComment(boo.id) ,as:'com'}
                            	<li>
                                	<div class="ea_wc_1">
                                    	<div class="eac1_a">${com.comDet }</div>
                                        <div class="eac1_b">[${util.Util.sdf(com.comTime,"yyyy-MM-dd HH:mm") }]</div>
                                    </div>
                                    <div class="ea_wc_2">
                                    	<div class="eawc_1">${com.memId }</div>
                                        <div class="eawc_2">
                                        	<div style="overflow: hidden;line-height: 12px;background: url('/public/indexFile/images/list_10.gif') no-repeat;float: left;height: 12px;margin-top: 2px;width: 60px;">
		                                		<div style="background: url('/public/indexFile/images/list_09.gif');height: 12px;width: ${(com.xj/5)*60}px;line-height:12px;">
		                                		</div>
		                                	</div>
                                        </div>
                                    </div>
                                </li>
                                #{/list }
                            </ul>
                        </div>
                        <div class="ea_2c5">
                        	<ul>
                            	<li class="ea_y1">&lt;&lt;上一页</li>
                                <li><a href="#" class="eanr">1</a></li>
                                <li><a href="#">2</a></li>
                                <li><a href="#">3</a></li>
                                <li><a href="#">4</a></li>
                                <li><a href="#">5</a></li>
                                <li class="ea_y2">下一页&gt;&gt;</li>
                            </ul>
                        </div>
                    </div>
                    <form action="/" method="post">
	                    <div class="ea_2d">
	                    	<div class="ea_2c1">发表评论</div>
	                        <div class="ea_2d_2">
	                        	<div class="ea2_d1">标题</div>
	                            <div class="ea2_d2">
	                            	<input type="text" id="bootitle"/>
	                            </div>
	                            <div id="pf" style="padding: 0 1px 0 0;cursor: pointer;overflow: hidden;line-height: 12px;background: url('/public/indexFile/images/list_10.gif') no-repeat;float: left;height: 12px;margin-top: 2px;width: 60px;">
	                            	<div id="df" style="border-right:solid 1px red ;background: url('/public/indexFile/images/list_09.gif');height: 12px;width:0px;line-height:12px;">
	                           		</div>
	                            </div>
	                            <div id="df_d" style="float: left;" value="0"></div>
	                        </div>
	                        <div class="ea_2d_3">
	                        	<div class="ea2_d1">内容</div>
	                            <div class="ea2b_b">
	                            	<textarea id="boocenter"></textarea>
	                            </div>
	                        </div>
	                        <div class="ea_2d_4">
	                        #{if service.MemberService.ckLogin(session) == null}
	                        	<a href="/controllers/MemberView.log"><img src="/public/indexFile/images/book_21.gif"/></a>
	                    	#{/if}
	                    	#{else}
	                    		<a href="javascript:subBoo()"><img src="/public/indexFile/images/book_22.gif"/></a>
	                    	#{/else}
	                    	</div>
	                    </div>
                    </form>
                </div>
                <div class="elca_3"></div>
            </div>
        </div>
    </div>
    <!-- content 结束-->
    
    <script type="text/javascript">
        var Sys = {};
        var ua = navigator.userAgent.toLowerCase();
        var s;
        (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
        (s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
        (s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
        (s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
        (s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;

        
    </script>
    #{set mb:service.MemberService.ckLogin(session) /}
    <script type="text/javascript">
    	$("#pf").mousemove(function(e){
    		var x = e.clientX;
    		//以下进行测试
	        if (Sys.firefox) x=x-0.5;
			var l = this.getBoundingClientRect().left;
    		$("#df").width(x-l-1);
    		var df = (x-l)/(60/5)+"";
    		
    		var ind = df.indexOf(".");
			if(df.length > ind+2){
				df = df.substring(0,ind+2);
			}
    		$("#df_d").text(df+"分");
    		$("#df_d").attr("value",df);
    	});
    	var islog = "#{get 'mb' /}";
    	
    	$("a[rel='putBoo']").click(function(e){
    		if(islog == ""){
    			aduAlert("你还未登录,请先登录!","提示",function(e){
    				window.location = "/login.html";
    			});
    		}else{
	    		var id = this.id;
	    		$.ajax({
	    			url:'/controllers/Order.addBook',
	    			type:'post',
	    			data:'booid='+id,
	    			success:function(e){
	    				if(e != ""){
	    					aduAlert('你借阅书籍已经达到了当前借阅等级的上限,前去充值,提升自己的等级!','提示',function(e){
	    						window.location='/controllers/MemberView.paymoney'
	    					})
	    				}else{
		    				aduConfirm("加入成功","提示",function(fag){
								if(!fag){
									window.open("/controllers/Order.showCar");
								}
							},{
								okBut:'继续借阅',
								cancelBut:'查看'
							});
						}
	    			}
	    		});
    		}
    		return false;
    	});
    	
    	
    	function subBoo(){
    		var tit = $("#bootitle").val();
    		var cen = $("#boocenter").val();
    		if(tit == "" ){aduAlert("评论标题不能为空","提示");}
    		else if(cen == "" ){aduAlert("评论内容不能为空","提示");}
    		else{
	    		$.ajax({
	    			url:'/controllers/Bookaction.comment',
	    			type:'post',
	    			dataType:'html',
	    			data:{lev:$("#df_d").attr("value"),cen:cen,tit:tit,booid:${boo.id}},
	    			success:function(e){
	    				alert(e);
	    				window.location.reload();
	    			}
	    		});
    		}
    	}
    	
    	$("#fengx").click(function(){
    		WriteSNS();
    	});
    </script>
    <script type="text/javascript" src="http://s.shareto.com.cn/js/shareto_button.js" charset="utf-8"></script>